package com.face.server.entity;

import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 学生用户
 */
@Data
@Document(collection = "joined")
public class Student extends Joined {

    private Auth auth = new Auth();

//    private int type = 0;

    private String username;

    // 积分
    private float point;

    // 学号
    private int studentNumber;

    // 班级名
    private String className;

    // 班级开始时间
    private Date classBegin;

    // 班级结束时间
    private Date classEnd;

    // 消息
    private List<UploadLog> uploadLogs = new ArrayList<>();

    private String nickname;

    @Data
    private class UploadLog {
        private String content;
        private LocalDateTime time;
        private boolean read; // true已读
    }

    public Auth getAuth() {
        return auth;
    }
}
